home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / sound / mled / mled_hdinstall < prev    next >
Text File  |  1995-07-31  |  7KB  |  233 lines

  1. ;-------------------------------------------------
  2. ; HD Installation script for Musicline Editor 1.10
  3. ; Copyright © 1995 by Musicline.
  4. ; Written by Conny Cyreus.
  5. ;-------------------------------------------------
  6. ;$VER: Musicline Editor HDInstall 1.10 ()
  7.  
  8. ; Check kickversion.
  9. ;-------------------
  10.  
  11.   (if (< (/ (getversion) 65536) 37)
  12.    (abort "Musicline Editor will only run under Kickstart 2.04 or above!")
  13.   )
  14.  
  15.   (if (= (getassign "SYS") "MusiclineEditor:")
  16.    (abort "If you wan't to install Musicline Editor on your HD. You must boot from your HD!")
  17.   )
  18.  
  19. ; Select drawer.
  20. ;---------------
  21.  
  22.   (welcome)
  23.   (complete 0)
  24.   (set @default-dest (getassign "MlEd" "dva"))
  25.  
  26.   (if (= @default-dest "")
  27.    ((set @default-dest (getassign "Work" "dva"))
  28.     (if (= @default-dest "") (set @default-dest (getassign "SYS" "dva")))
  29.     (set @default-dest (askdir (prompt "Please select a drive or drawer where\nMusicline Editor should be installed!\nA drawer will be created there.")
  30.     (help "In this location a drawer will be created. All files except the libraries and the font will be installed inside this drawer.")
  31.     (default @default-dest)))
  32.     (set @default-dest (tackon @default-dest "MusiclineEditor"))
  33.    )
  34.    ((set bool (askbool (prompt "Installing Musicline Editor in\n" @default-dest) (default 1) (help @askbool-help)))
  35.     (if (= bool 0)
  36.      ((set @default-dest (getassign "SYS" "dva"))
  37.       (set @default-dest (askdir (prompt "Please select a drive or drawer where\nMusicline Editor should be installed!\nA drawer will be created there.")
  38.       (help "In this location a drawer will be created. All files except the libraries and the font will be installed inside this drawer.")
  39.       (default @default-dest)))
  40.       (set @default-dest (tackon @default-dest "MusiclineEditor"))
  41.      )
  42.     )
  43.     (working "Comparing versions of Musicline Editors.")
  44.     (set MlEdNew (getversion ("MusiclineEditor/MlEd")))
  45.     (set MlEdOld (getversion (tackon @default-dest "MlEd")))
  46.     (if (> (BITAND MlEdOld) (BITAND MlEdNew))
  47.      ((set MlEdOldVer (/ MlEdOld 65536))
  48.       (set MlEdOldRev (- MlEdOld (* MlEdOldVer 65536)))
  49.       (set MlEdNewVer (/ MlEdNew 65536))
  50.       (set MlEdNewRev (- MlEdNew (* MlEdNewVer 65536)))
  51.       (abort "You are trying to install an old version of Musicline Editor!\n"
  52.       ("Installed version  : %ld.%02ld\nVersion to install : %ld.%02ld" MlEdOldVer MlEdOldRev MlEdNewVer MlEdNewRev))
  53.      )
  54.     )
  55.    )
  56.   )
  57.  
  58.   (complete 3)
  59.  
  60. ; Delete some old files if exists.
  61. ;-----------------------------------------
  62.  
  63.   (if (exists (tackon @default-dest "ReadMe.Txt" (noreq)))
  64.    ((delete (tackon @default-dest "ReadMe.Txt")
  65.     (optional force))
  66.    (delete (tackon @default-dest "ReadMe.Txt.info")
  67.     (optional force)))
  68.   )
  69.  
  70.   (if (exists (tackon @default-dest "History.Txt" (noreq)))
  71.    ((delete (tackon @default-dest "History.Txt")
  72.     (optional force))
  73.    (delete (tackon @default-dest "History.Txt.info")
  74.     (optional force)))
  75.   )
  76.  
  77.   (if (exists (tackon @default-dest "MlEd.Doc" (noreq)))
  78.    ((delete (tackon @default-dest "MlEd.Doc")
  79.     (optional force))
  80.    (delete (tackon @default-dest "MlEd.Doc.info")
  81.     (optional force)))
  82.   )
  83.  
  84.   (complete 5)
  85.  
  86. ; Copy Musicline Editor files to main dir.
  87. ;-----------------------------------------
  88.  
  89.   (working "Checking for MlEd files.")
  90.   (copyfiles (prompt "Install Musicline Editor.")
  91.    (source "MusiclineEditor")
  92.    (dest @default-dest)
  93.    (pattern "#?")
  94.    (files)
  95.    (infos)
  96.    (optional fail)
  97.    (confirm)
  98.    (help @copyfiles-help)
  99.   )
  100.   (set Destination (substr @default-dest 0 (- (strlen @default-dest) 15)))
  101.   (set Musicline (substr @default-dest (- (strlen @default-dest) 15) 15))
  102.   (if (= Musicline "MusiclineEditor")
  103.    (copyfiles (source "Icon") (dest Destination) (pattern "MusiclineEditor.info") (files) (optional nofail))
  104.   )
  105.  
  106.   (complete 37)
  107.  
  108. ; Copy Instruments.
  109. ;------------------
  110.  
  111.   (working "Checking for instruments.")
  112.   (makedir (tackon @default-dest "Instruments"))
  113.   (copyfiles (prompt "Install Instruments.")
  114.    (source "MusiclineEditor/Instruments")
  115.    (dest (tackon @default-dest "Instruments"))
  116.    (all)
  117.    (optional fail force)
  118.    (confirm)
  119.    (help @copyfiles-help)
  120.   )
  121.  
  122.   (complete 38)
  123.  
  124. ; Copy samples.
  125. ;--------------
  126.  
  127.   (if (= (exists (tackon @default-dest "Wavesamples") (noreq)) 2)
  128.    (rename (tackon @default-dest "Wavesamples") (tackon @default-dest "Samples"))
  129.   )
  130.   (working "Checking for Samples.")
  131.   (makedir (tackon @default-dest "Samples"))
  132.   (copyfiles (prompt "Installing Samples.")
  133.    (source "MusiclineEditor/Samples")
  134.    (dest (tackon @default-dest "Samples"))
  135.    (all)
  136.    (optional fail force)
  137.    (confirm)
  138.    (help @copyfiles-help)
  139.   )
  140.  
  141.   (complete 40)
  142.  
  143. ; Copy Waves.
  144. ;------------
  145.  
  146.   (if (= (exists (tackon @default-dest "Waveforms") (noreq)) 2)
  147.    (rename (tackon @default-dest "Waveforms") (tackon @default-dest "Waves"))
  148.   )
  149.   (working "Checking for waves.")
  150.   (makedir (tackon @default-dest "Waves"))
  151.   (copyfiles (prompt "Installing Waves.")
  152.    (source "MusiclineEditor/Waves")
  153.    (dest (tackon @default-dest "Waves"))
  154.    (all)
  155.    (optional fail force)
  156.    (confirm)
  157.    (help @copyfiles-help)
  158.   )
  159.  
  160.   (complete 42)
  161.  
  162. ; Copy modules.
  163. ;------------------
  164.  
  165.   (working "Checking for modules.")
  166.   (makedir (tackon @default-dest "Modules"))
  167.   (copyfiles (prompt "Installing Modules.")
  168.    (source "MusiclineEditor/Modules")
  169.    (dest (tackon @default-dest "Modules"))
  170.    (all)
  171.    (optional fail force)
  172.    (confirm)
  173.    (help @copyfiles-help)
  174.   )
  175.  
  176.   (complete 90)
  177.  
  178. ; Copy Libraries to libs:
  179. ;------------------------
  180.  
  181.   (if (< (/ (getversion) 65536) 39)
  182.    (set srclib "Libs/2.x")
  183.    (set srclib "Libs/3.x")
  184.   )
  185.  
  186.   (working "Comparing versions of diskfont.libraries.")
  187.   (copylib (prompt "Musicline Editor needs diskfont.library!")
  188.    (source (tackon srclib "diskfont.library"))
  189.    (dest "Libs:")
  190.    (optional fail force)
  191.    (confirm)
  192.    (help @copylib-help)
  193.   )
  194.  
  195.   (complete 93)
  196.  
  197.   (working "Comparing versions of asl.libraries.")
  198.   (copylib (prompt "Musicline Editor needs asl.library!")
  199.    (source (tackon srclib "asl.library"))
  200.    (dest "Libs:")
  201.    (optional fail force)
  202.    (confirm)
  203.    (help @copylib-help)
  204.   )
  205.  
  206.   (complete 98)
  207.  
  208. ; Copy font to font:
  209. ;------------------------
  210.  
  211.   (copyfiles (prompt "Install Musicline fonts")
  212.    (source "Fonts")
  213.    (dest "Fonts:")
  214.    (all)
  215.    (optional fail force)
  216.    (confirm)
  217.    (help @copyfiles-help)
  218.   )
  219.  
  220.   (complete 99)
  221.  
  222. ; Make assign in user-startup
  223. ;----------------------------
  224.  
  225.   (startup "MusiclineEditor" (prompt "Making assign for Musicline Editor in user-startup.")
  226.    (command "Assign MlEd: " (expandpath (@default-dest)))
  227.    (help @startup-help)
  228.   ) 
  229.  
  230.   (makeassign "MlEd" @default-dest)
  231.   (complete 100)
  232.   (exit "")
  233.